

import java.io.IOException;

import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

public class Midlet extends MIDlet implements CommandListener{
	BomberCanvas canvas;
BomberManThread thread;
	public void commandAction(Command arg0, Displayable arg1) {
		// TODO Auto-generated method stub
		
	}

	protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
		// TODO Auto-generated method stub
		
	}

	protected void pauseApp() {
		// TODO Auto-generated method stub
		
	}

	protected void startApp() throws MIDletStateChangeException {
		// TODO Auto-generated method stub
	
                try {
                    canvas =  new BomberCanvas();
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
			Display.getDisplay(this).setCurrent(canvas);
			canvas.setCommandListener(this);
		
                if(thread==null){
                    thread = new BomberManThread(canvas);
                    thread.start();
                }
	}

}
